<layout name='Layout/layout_page' />

	
	<ol class="breadcrumb">
		<li><a href="<{:U('Record/index')}>">工作记录管理</a></li>
      	<li class="active">添加</li>
    </ol>

    <TABLE class="table table-hover table-bordered" border="0" cellSpacing="0" cellPadding="0" width="100%">
    	<caption>会员编号【<{$userid}>】工作记录</caption>
	  <THEAD>
		<tr>
		  <TH>姓名</TH>
		  <TH>手机</TH>
		  <TH>工作职位</TH>
		  <TH>入职日期</TH>
		  <TH>离职日期</TH>
		</tr>
	  </THEAD>
	  <TBODY>             
			<volist name="list" id="vo">
			<tr>
			  <td><{$vo.name}></td>			  
			  <td><{$vo.mobile}></td>			  
			  <td><{$vo.job}>(<{$vo.company}>)</td>			  
			  <td><{$vo.startDate|date='Y-m-d',###}></td>
              <td><eq name="vo.endDate" value="0"><a href="javascript:void(0)" class="btn btn-default btn-sm" onclick="sel('设置离职' , '<{:U('Record/setend',array('id'=>$vo['id']))}>' , 'demo' , 780, 300)">设置离职</a><else/><{$vo.endDate|date='Y-m-d',###}></eq></td>
			</tr>
			</volist>
	  </TBODY>
	</TABLE>

	<form id="ajaxForm" action="<{:U('Record/save')}>" method="post" class="form-horizontal form-validata">
		<div class="form-group">
			<label class="col-md-1 control-label">会员编号</label>
			<div class="col-md-4">
				<div class="form-control-static"><{$user['userid']}></div>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label">所在企业</label>
			<div class="col-md-4">
				<select name="companyID" id="companyID" class="form-control" data-rule-required="true">
					<option value="">==请选择==</option>
					<volist name="company" id="vo">
				<option value='<{$vo['id']}>'><{$vo['name']}></option>
				</volist>
				</select>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label">职位</label>
			<div class="col-md-4">
				<input type="text"
                class="form-control"
				name="job"
				id="job"
				data-rule-required="true"
				value="<{$job}>" 
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label">姓名</label>
			<div class="col-md-4">
				<input type="text"
                class="form-control"
				name="name"
				id="name"
				value="<{$user['name']}>" 
				data-rule-required="true"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label">手机</label>
			<div class="col-md-4">
				<input type="text"
                class="form-control"
				name="mobile"
				id="mobile"
				value="<{$user['username']}>" 
				data-rule-required="true"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label">入职日期</label>
			<div class="col-md-4">
				<input type="text"
                class="form-control"
				name="startDate"
				id="startDate"
				readonly="readonly" 
				data-rule-required="true"
				/>
				<script> 
				$(function(){
					$("#startDate" ).datepicker();
					$("#startDate" ).datepicker("option", "dateFormat", "yy-mm-dd");

				});
				</script>
			</div>
		</div>
	
		<div class="form-group">
			<div class="col-md-11 col-sm-offset-1">
				<button type="submit" class="btn btn-info">添加</button>
			</div>
		</div>
		<input type="hidden" name="userid" id="userid" value="<{$user['userid']}>">
	</form>

<script>
	$('#companyID').val(<{$companyID}>);
</script>
<input type="hidden" id="menu_action" value="user" />